package com.moxing.admin.controller;


import com.moxing.admin.common.dto.RestResponseDTO;
import com.moxing.admin.service.UserService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@Api(tags = "/api/user",description = "用户管理")
@RestController
@RequestMapping("/api/user")
public class UserController {


    @Autowired
    private UserService userService;

    /**
     * 根据id查询用户信息
     * @return
     */
    @ApiOperation(value = "根据id查询用户信息",httpMethod = "GET")
    @GetMapping("/getUserById")
    @ResponseBody
    public RestResponseDTO getUserById(@RequestParam String id) {
        return RestResponseDTO.success(userService.getUserById(id));
    }
}
